/*******************************************************************************
 * This code is totally free to edit and be distributed
 * Author: José Manuel Portero García (jmporterog@gmail.com)
 ******************************************************************************/
package gazpachito.examples.dozer.facade;

import java.io.Serializable;

/**
 * 
 * @author jmporterog
 *
 */
public class ChildBO implements Serializable {

	private static final long serialVersionUID = -3066509911454147138L;

	protected Integer businessId;
	
	protected Double price;
	
	protected ParentBO parentBO;
	
	public Integer getBusinessId() {
		return businessId;
	}

	public void setBusinessId(Integer businessId) {
		this.businessId = businessId;
	}

	public Double getPrice() {
		return price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}

	public ParentBO getParentBO() {
		return parentBO;
	}

	public void setParentBO(ParentBO parentBO) {
		this.parentBO = parentBO;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((businessId == null) ? 0 : businessId.hashCode());
		result = prime * result + ((price == null) ? 0 : price.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		ChildBO other = (ChildBO) obj;
		if (businessId == null) {
			if (other.businessId != null)
				return false;
		} else if (!businessId.equals(other.businessId))
			return false;
		if (price == null) {
			if (other.price != null)
				return false;
		} else if (!price.equals(other.price))
			return false;
		return true;
	}
}
